#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main() {
    int i, shi, er[8];
    scanf("%d", &shi);
    for (i=0; i<8; ++i) 
    {
        er[i] = 2;
    }
    i = 0;
    while (shi >= 2) 
    {
        er[i] = shi % 2;
        i = i + 1;
        shi = shi / 2;
    }
    er[i] = shi;
    for (i=7; i>=0; i--) 
    {
        if (er[i] == 2) 
            printf("%d", 0);
        else
            printf("%d", er[i]);
    }
    return 0;
}